﻿// Decompiled with JetBrains decompiler
// Type: DnProcessSimulateCommands.ExportToRTR.CApExportToRTRJointData
// Assembly: DnProcessSimulateCommands, Version=2402.0.0.890, Culture=neutral, PublicKeyToken=null
// MVID: A885D881-AEDF-447E-852A-6F13102E089C
// Assembly location: C:\Program Files\Tecnomatix_2402\eMPower\DotNetCommands\DnProcessSimulateCommands.dll


namespace DnProcessSimulateCommands.ExportToRTR{

internal class CApExportToRTRJointData
{
  private const string FIXED_JOINT = "fixed";
  private const string REVOLUTE_JOINT = "revolute";
  private const string PRISMATIC_JOINT = "prismatic";

  public string Name { get; set; }

  public JointType Type { get; set; }

  public int Index { get; set; }

  public string Parent { get; set; }

  public string Child { get; set; }

  public double[] Axis { get; set; }

  public CApExportToRTROrigin Origin { get; set; }

  public CApExportToRTRCalibration Calibration { get; set; }

  public CApExportToRTRDynamics Dynamics { get; set; }

  public CApExportToRTRLimit Limit { get; set; }

  public CApExportToRTRMimic Mimic { get; set; }

  public CApExportToRTRSafetyController SafetyController { get; set; }

  public string TypeString
  {
    get
    {
      switch (this.Type)
      {
        case JointType.FIXED:
          return "fixed";
        case JointType.REVOLUTE:
          return "revolute";
        case JointType.PRISMATIC:
          return "prismatic";
        default:
          return "";
      }
    }
  }

  public CApExportToRTRJointData(string parent, string child, int index = -1)
  {
    this.Name = $"{parent}_to_{child}";
    this.Type = JointType.FIXED;
    this.Parent = parent;
    this.Child = child;
    this.Index = index;
  }

  public CApExportToRTRJointData(
    string name,
    JointType type,
    string parent,
    string child,
    int index = -1,
    CApExportToRTROrigin origin = null,
    double[] axis = null,
    CApExportToRTRCalibration calibration = null,
    CApExportToRTRDynamics dynamics = null,
    CApExportToRTRLimit limit = null,
    CApExportToRTRMimic mimic = null,
    CApExportToRTRSafetyController safetyController = null)
  {
    this.Name = name;
    this.Type = type;
    this.Index = index;
    this.Parent = parent;
    this.Child = child;
    this.Origin = origin;
    this.Axis = axis;
    this.Calibration = calibration;
    this.Dynamics = dynamics;
    this.Limit = limit;
    this.Mimic = mimic;
    this.SafetyController = safetyController;
  }
}
